package com.liang.liangapiinterface;

//import com.liang.liangapiinterface.client.LiangApiClient;
//import com.liang.liangapiinterface.model.User;

import com.liang.liangclientsdk.client.LiangApiClient;
import com.liang.liangclientsdk.model.User;

import javax.annotation.Resource;

public class Main {

    @Resource
    private static LiangApiClient liangApiClient;

    public static void main(String[] args) {
        String accessKey ="liang";
        String result = liangApiClient.getNameByGet("liangapi");
        User user = new User();
        user.setUsername("liang");
        String userNameByPost = liangApiClient.getUserNameByPost(user);
        System.out.println(result);
        System.out.println(userNameByPost);
//        String secretKey = "abcdefg";
//        LiangApiClient liangApiClient = new LiangApiClient(accessKey, secretKey);
//        String result1 = liangApiClient.getNameByGet("理想怎么梁");
//        String result2 = liangApiClient.getNameByPost("理想怎么梁");
//        User user = new User();
//        user.setUsername("liang");
//        String result3 = liangApiClient.getUserNameByPost(user);
//        System.out.println(result1);
//        System.out.println(result2);
        System.out.println(accessKey);
    }
}
